﻿<%@ Page Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true" Inherits="Product_P_Details" Title="Untitled Page" Codebehind="P_Details.aspx.cs" %>

<%@ Register Src="../Controls/GuangGao.ascx" TagName="GuangGao" TagPrefix="uc4" %>

<%@ Register Src="../Controls/SPLink.ascx" TagName="SPLink" TagPrefix="uc3" %>
<%@ Register Src="../Controls/UserView.ascx" TagName="UserView" TagPrefix="uc2" %>
<%@ Register Src="../Controls/CategoryMeau.ascx" TagName="CategoryMeau" TagPrefix="uc1" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
    <script type="text/javascript" src="../Include/JS/jquery-1.2.6.js"></script>
    <script src="../Include/JS/jquery.jqzoom.js" type="text/javascript"></script>
    <%--<script type="text/javascript" src="../Include/JS/Products/Products.js"></script>--%>
    <script type="text/javascript" src="../Include/JS/Products/Product.js"></script>
    <script src="../Include/JS/Pager.js" type="text/javascript"></script>
    <script language="javascript" type="text/javascript" src="../Include/JS/showdiv.js"></script>
    <script language="javascript" type="text/javascript" src="../Include/JS/userComment.js"></script>
    <script type="text/javascript" src="../Include/JS/messageList.js"></script>
    <script type="text/javascript" src="../Include/JS/Products/Carts.js"></script>
   <script type="text/javascript" src="../Include/JS/qq.js"></script>
   <%--
    <link href="../App_Themes/main/ringnor.css" rel="stylesheet" type="text/css" />
    <link href="../App_Themes/main/jqzoom.css" rel="stylesheet" type="text/css" />
   --%>
    <script type="text/javascript">
        var  $j = jQuery.noConflict();
        var err_mes = "";
        var SelectColor="";
    

    function initProduct(ProductCode,Color)
    {        
    
        $j.ajax
        (
            {
                url : "../Handler/ProductDetailsHandler.ashx?PID="+ProductCode+"&Color="+Color,
                type : "GET",
                success : function(data)
                {
                    if(showProduct(ProductCode,Color, true))
                    {
                        //alert("下面加载相似商品信息");
                    }
                },
                error : function()
                {}
            }
        );
    } 
        $=jQuery.noConflict();
        
           //放大镜



         jQuery(document).ready
         (
             function()
             {
                //放大境


                 jQuery("img.jqzoom").jqueryzoom({
                 xzoom: 280,
                 yzoom: 240,
                 offset: 15,
                 position: "right"});
//                 var productCode = "<%=ProductID %>";
//                 updateProductClickCount(productCode);
             }
         );
         //End放大镜


         
        function checkTheNull()
        {
            document.getElementById("comment").value="";
        } 
        function checkTheNull2()
        {
            document.getElementById("title").value="";
        } 
        function checkTheNull3()
        {
            document.getElementById("titlemessage").value="";
        } 
        function checkTheNull4()
        {
            document.getElementById("message_list").value="";
        }
function setTitle()
{
    var arg=document.getElementById("ctl00$ContentPlaceHolder1$hdColorCode").value;
    <%= ClientScript.GetCallbackEventReference(this, "arg", "ReceiveServerData", "")%>; 
}
function ReceiveServerData(result)
{
    window.document.title="<%=ProductName%>"+" "+result+" "+"<%=WebTitle %>";
}
function ChangeKC(product,color,size)
{debugger;
    if(size!="-1")
    {//alert(product+color);
          $j.post("../Handler/SizeChangeKCHandler.ashx", { PID: product,Color:color,Size:size},
          function(data){         
            if(data)
            {     
                if(data.length>0)
                {
                    if(parseFloat(data)<1)
                    {
                        document.getElementById("Stock").innerHTML="库存不足";
                    }
                    else
                    {
                        document.getElementById("Stock").innerHTML="";
                    }
                }
                
            }
            else
            {
                alert("");
            }
        }
    );
        //alert(product+color);
    }
}
window.attachEvent("onload",function winload()
{debugger;
    var proId=document.getElementById("ProductCode").innerHTML;
    var color=document.getElementById("ctl00_ContentPlaceHolder1_hdColorCode").value;
    setProduct(proId,color);
});
    </script>

    <div class="r_content">
        <!-- left -->
        <div class="r_left">
            <div class="r_left_news">
                <div class="r_left_news_top">
                    <h2>
                        产品中心</h2>
                </div>
                <div class="r_left_news_middle1">
                    <uc1:CategoryMeau ID="CategoryMeau1" runat="server" />
                </div>
                <div class="r_left_news_bottom">
                </div>
            </div>
            <div class="r_left_news">
                <uc2:UserView ID="UserView1" runat="server" />
            </div>
             <div class="r_left_news">
                <uc4:GuangGao ID="GuangGao1" runat="server" />
            </div>
        </div>
        <!-- left -->
        <!-- right -->
        <div class="r_right" id="P_List">
            <!-- right -->
            <input id="Hid_SelectColor" type="hidden" value='<%=SelectColor %>' />
            <div class="r_right">
                <div class="r_title1">
                    <h2>
                        <span id="ProductName"><%=ProductName%></span>
                    </h2>
                </div>
                <div class="r_box1">
                    <div class="rb_left" id="pbigImg">
                        <div>
                            <a href="Javascript:" onclick="ShowBigImg()"><img id="MiddleImage" src='<%=Bigsrc %>' alt="" /></a>
                        </div>
                        <div class="rb_leftlj">
                            <a href="Javascript:ShowBigImg()">
                                <img src="../Images/zoombutton.jpg" alt="" /></a>
                        </div>
                        <ul id="psmallimg">
                        <%=Partimglist%>
                        </ul>
                    </div>
                    <div class="rb_right">
                        <ul>
                            <li><span>品牌 Brand：</span> <span id="Brand"><%=Brand%></span></li>
                            <li><span>编号 Number：</span> <span id="ProductCode"><%=ProductID%></span></li>
                            <li><span>面料 Fabrics：</span> <span id="Fabrics"><%=Fabrics%></span></li>
                            <li><span>重量 Weight：</span> <span id="Weight"><%=Weight%></span><span>g</span></li>
                            <li><span>风格 Style：</span> <span id="Style"><%=Style%></span></li>
                            
                        </ul>
                        <div class="rb_right_chanpin">
                            <dl>
                                <dt></dt>
                                <dd>
                                    <span>吊牌价 Price tag：</span>
                                    <input id="Hid_ZK" type="hidden" value='<%=ZK %>' /><span id="DPJ"><%=Price%></span>
                                </dd>
                                <dd>
                                    <table>
                                        <tr>
                                            <td>
                                                <span>会员价 Member Price：</span></td>
                                            <td>
                                                <em><span id="MemberPrice" style="display: none"></span></em><div style="display: inline;">
                                                    <a href="../Users/login.aspx" id="login">请登陆</a></div>
                                            </td>
                                        </tr>
                                    </table>
                                </dd>
                            </dl>
                        </div>
                        <div class="rb_right_huodong" style="display:none">
                            <span>活动：</span> 2008年02月05日期间，举行积分换购活动。<<a href="#"><em>活动详情</em></a>>
                        </div>
                        <div class="rb_yanse">
                            <dl>
                                <dt></dt>
                                <asp:HiddenField ID="hdColorCode" runat="server"/>
                                <dd id="ColorList">
                                <%=Colorlist%>
                                </dd>
                                <dd id="Size">尺寸：<%=Sizelist%></dd><dd>数量：<input name="textfield2" id="Amount" type="text" value="1" size="1"/></dd></dl>
                        </div>
                        <div class="rb_yanse">
                         <span id="Stock"><%=kc %></span>
                        </div>
                        <div class="rb_button">
                            <ul>
                                <li><a href="#" id="GOBUY">立即购买</a></li><li><a href="#" id="GoCollect">收藏</a></li></ul>
                        </div>
                    </div>
                </div>
                <div class="rb_xct" id="pnote">
                <%=Note%>
                </div>
                <div class="r_box">
                    <uc3:SPLink id="SPLink1" runat="server"></uc3:SPLink></div>
                <div class="r_box">
                   <%-- <div id="main">
                        <div id="left">--%>
                            <div id="comments" class="cm">
                                <h4 class="clearfix">
                                    <a id="a_1" class="now" href="javascript:void(0);" onmouseover="showDiv(this, 'userComment', 2, 'now');">
                                        评论信息 </a><a id="a_2" class="" href="javascript:void(0);" onmouseover="showDiv(this, 'userComment', 2, 'now');">
                                            留言信息 </a>
                                </h4>
                                <div id="userComment_1">
                                    <div id="tbCommentList2">
                                    </div>
                                    <table summary="表格的解释" class="cme" style="width: 729px">
                                        <tfoot>
                                            <tr>
                                                <td style="width: 729px">
                                                    <span id="LabPager"></span>
                                                </td>
                                            </tr>
                                        </tfoot>
                                    </table>
                                    <table summary="表格的解释" class="cme">
                                        <tr>
                                            <td>
                                                评分：


                                            </td>
                                            <td>
                                                <img alt="一星" id="img_5" src="../Images/star_red_big.gif" onmouseover="showCommentGrade(5)" />
                                                <img alt="两星" id="img_4" src="../Images/star_red_big.gif" onmouseover="showCommentGrade(4)" />
                                                <img alt="三星" id="img_3" src="../Images/star_red_big.gif" onmouseover="showCommentGrade(3)" />
                                                <img alt="四星" id="img_2" src="../Images/star_red_big.gif" onmouseover="showCommentGrade(2)" />
                                                <img alt="五星" id="img_1" src="../Images/star_red_big.gif" onmouseover="showCommentGrade(1)" />
                                                &nbsp;&nbsp;&nbsp;
                                                <label id="lbl" visible="true" style="color: #e64e1f;">
                                                    非常喜欢</label>
                                                &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<label id="lblTemp" style="color: #e64e1f;">(鼠标放在五角星上评分)</label>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td>
                                                标题：


                                            </td>
                                            <td>
                                                <input class="input" name="" id="title" type="text" value="请输入评论标题" style="color: Gray;
                                                    width: 300px;" onclick="checkTheNull2()" />
                                            </td>
                                        </tr>
                                        <tr>
                                            <td valign="top">
                                                评论内容：


                                            </td>
                                            <td>
                                                <textarea class="textarea" name="" id="comment" cols="90" rows="7" style="color: Gray;
                                                    font-size: 12px; padding: 5px;" onclick="checkTheNull()">提示:如果您没有购买过此商品是不能够评论的,但是可以登录留言!</textarea>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td>
                                            </td>
                                            <td>
                                                <a class="button" href="javascript:submitComment('<%=ProductID %>')">提交</a> <a class="button"
                                                    style="margin-left: 10px;" href="javascript:checkClear()">重置</a>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td>
                                            </td>
                                            <td>
                                                <div class="tips">
                                                    *请注意网络道德 ^_^
                                                    <br />
                                                    &nbsp;&nbsp;请不要发表包含色情、人身攻击以及与中华人民共和国现行法律相抵触的言论。否则，由此产生的一切后果由提交者自负。


                                                </div>
                                            </td>
                                        </tr>
                                    </table>
                                </div>
                            </div>
                            <div id="userComment_2" class="cm" style="display: none;">
                                <table summary="表格的解释" width="729px" id="tableMessageList">
                                    <colgroup>
                                        <col class="nameCol" />
                                        <col class="mesCol2" />
                                        <col class="timeCol" />
                                    </colgroup>
                                    <thead>
                                        <tr>
                                            <th width="240">
                                                昵称
                                            </th>
                                            <th width="260">
                                                留言内容
                                            </th>
                                            <th width="229">
                                                留言时间
                                            </th>
                                        </tr>
                                    </thead>
                                    <tfoot>
                                        <tr>
                                            <td colspan="3">
                                                <span id="divPager"></span>
                                            </td>
                                        </tr>
                                    </tfoot>
                                    <tbody id="tbMessageList">
                                    </tbody>
                                </table>
                                <table summary="表格的解释" class="cme">
                                    <tr>
                                        <td>
                                            标题：


                                        </td>
                                        <td>
                                            <input class="input" name="123A" id="titlemessage" type="text" value="请输入留言标题" onclick="checkTheNull3()"
                                                style="color: Gray; width: 300px;" />
                                        </td>
                                    </tr>
                                    <tr>
                                        <td valign="top">
                                            留言内容：


                                        </td>
                                        <td>
                                            <textarea class="textarea" name="" id="message_list" cols="90" rows="7" onclick="checkTheNull4()"
                                                style="color: Gray; font-size: 12px; padding: 5px;">提示:如果您没有登录是不能够留言的,请登录!</textarea>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>
                                        </td>
                                        <td>
                                            <a class="button" href="javascript:submitMessage()">提交</a> <a class="button"
                                                style="margin-left: 10px;" href="javascript:ClearMessage()">重置</a>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>
                                        </td>
                                        <td>
                                            <div class="tips">
                                                *请注意网络道德 ^_^
                                                <br />
                                                &nbsp;&nbsp;请不要发表包含色情、人身攻击以及与中华人民共和国现行法律相抵触的言论。否则，由此产生的一切后果由提交者自负。


                                            </div>
                                        </td>
                                    </tr>
                                </table>
                            </div>
                       <%-- </div>
                        <!-- left over -->
                    </div>--%>
                </div>
                <div class="r_top_title">
                    <a href="#">
                        <img src="../Images/top.gif" alt="" /></a></div>
            </div>
            <!-- right -->
             <script type="text/javascript">PageInit();</script>
               <%-- <script type="text/javascript" language="javascript">
                        initProduct(<%="'"+ProductID+"'" %>,<%="'"+ Color+"'"%>);
                </script>--%>
        </div>
    </div>
    <div id="div_background" class="divbackground" onclick="hideCart();">
    </div>
    <iframe id="iframe_back" class="diviframe" frameborder="0"></iframe>
    <div id="ShoppingCart" style="z-index: 11; display: none">
    </div>
    <input type="hidden" id="hidGoodsId" value="<%=ProductID %>" />
</asp:Content>
